import { Service } from "cl-admin";
import BaseService from "@/service/base";
@Service("media")
class Media extends BaseService {
	// 全部列表
	list(params) {
		return this.$get('/app/list', { params })
	}
	// 分页列表
	page({ time, finish_time, ...args }) {
		let params = { ...args }
		return this.$get('/app/list', { params }).then(res => this.pagination(params, res))
	}
	// 新增
	add(params) {
		return this.$post('/app/add', params);
	}
	// 更新，包含 id
	edit(params) {
		return this.$post('/app/edit', params);
	}
	del(params) {
		return this.$post('/app/del', params);
	}
	// 媒体账户-列表
	accountList(params) {
		return this.$get('/account/list', { params })
	}
	// 媒体账户-子账户列表
	accountSub({ time, finish_time, ...args }) {
		let params = { ...args }
		// .then(res => this.pagination(params, res))
		return this.$get('/account/sub', { params })
	}
	// 先锋计划修改
	accountEdit(params) {
		return this.$post('/account/edit', params)
	}
}
export default Media
